package com.ndp.fb.walle.business;


import com.ndp.fb.exception.BusinessException;
import com.ndp.fb.model.business.vo.cache.result.UserAudienceTemplateCache;
import com.ndp.fb.rdb.model.UserAudienceTemplate;
import com.ndp.fb.rdb.model.UserAudienceTemplateLog;
import com.ndp.fb.walle.model.vo.useraudiencetemplate.param.UserAudienceTemplateVoParam;

import java.util.List;

/**
 * Created by Sisi on 15-1-20.
 */
public interface UserAudienceTemplateService {
    List<UserAudienceTemplate> findByCompanyIdAndConfigurationAndConnectionObject(String userId,
            Long productConfigurationId, Long fbConnectionObjectId);


    UserAudienceTemplateCache buildUserAudienceTemplateCache(String userId, Long companyId,
                                                             Long connectionObjectId, Long productConfigurationId);

    Long saveUserAudienceTemplate(String userId,
                                  UserAudienceTemplateVoParam userAudienceTemplateVoParam) throws BusinessException;


    Long countByCompanyConnectionObjectProductCfgAndName(Long companyId,Long fbConnectionObjectId,Long productCfgId, String name);
    
    Long saveUserAudiceTemplateLog(UserAudienceTemplateLog userAudienceTemplateLog);
}
